Hi Ray ,
I can't really think what that might be. It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
If you post all your source code and configuration files I could try to find it for you.
Regards
TK
Group: DynoMotion |
Message: 4448 |
From: himykabibble |
Date: 3/30/2012 |
Subject: Re: Wierd Problem.... |
Tom,
I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold
generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray ,
> Â
> I can't really think what that might be. It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> Â
> Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> Â
> If you post all your source code and configuration files IÂ could try to find it for you.
> Â
> Regards
> TKÂ
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thursday, March 29, 2012 7:46 PM
> Subject: [DynoMotion] Wierd Problem....
>
>
> Â
> Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
>
> Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
>
> Regards,
> Ray L.
>
|
|
Group: DynoMotion |
Message: 4452 |
From: himykabibble |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Tom,
I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold
> generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
>
> I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray ,
> > Â
> > I can't really think what that might be. It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> > Â
> > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> > Â
> > If you post all your source code and configuration files IÂ could try to find it for you.
> > Â
> > Regards
> > TKÂ
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thursday, March 29, 2012 7:46 PM
> > Subject: [DynoMotion] Wierd Problem....
> >
> >
> > Â
> > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
> >
> > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
> >
> > Regards,
> > Ray L.
> >
>
|
|
Group: DynoMotion |
Message: 4453 |
From: Tom Kerekes |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Hi Ray,
You have to wait for it to make the complete callback.
TK
Group: DynoMotion |
Message: 4454 |
From: himykabibble |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Tom,
Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on.
Any suggestions on my other issues:
1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter?
2) How to read ALL fixture offsets, so I can store them to XML?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> You have to wait for it to make the complete callback.
> Â
> TK
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, March 31, 2012 8:45 AM
> Subject: [DynoMotion] Re: Wierd Problem....
>
>
> Â
> Tom,
>
> I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold
> > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
> >
> > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray ,
> > > ÃÂ
> > > I can't really think what that might be.ÃÂ It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> > > ÃÂ
> > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> > > ÃÂ
> > > If you post all your source code and configuration files IÃÂ could try to find it for you.
> > > ÃÂ
> > > Regards
> > > TKÃÂ
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thursday, March 29, 2012 7:46 PM
> > > Subject: [DynoMotion] Wierd Problem....
> > >
> > >
> > > ÃÂ
> > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
> > >
> > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
> > >
> > > Regards,
> > > Ray L.
> > >
> >
>
|
|
Group: DynoMotion |
Message: 4455 |
From: Brad Murry |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
I created the Get and Set accessors for the offsets and piped them over to the .net side using only XYZ. We will need to add the other axis channels. -Brad From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of himykabibble Sent: Saturday, March 31, 2012 9:27 AM To: DynoMotion@yahoogroups.com Subject: [DynoMotion] Re: Wierd Problem.... Tom,
Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on.
Any suggestions on my other issues:
1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter?
2) How to read ALL fixture offsets, so I can store them to XML?
Regards, Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote: > > Hi Ray, >  > You have to wait for it to make the complete callback. >  > TK > > From: himykabibble <jagboy@...> > To: DynoMotion@yahoogroups.com > Sent: Saturday, March 31, 2012 8:45 AM > Subject: [DynoMotion] Re: Wierd Problem.... > > >  > Tom, > > I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running? > > Regards, > Ray L. > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote: > > > > Tom, > > > > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold > > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave. > > > > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes. > > > > Regards, > > Ray L. > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote: > > > > > > Hi Ray , > > >  > > > I can't really think what that might be. It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why. > > >  > > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it. > > >  > > > If you post all your source code and configuration files I could try to find it for you. > > >  > > > Regards > > > TK > > > > > > From: himykabibble <jagboy@> > > > To: DynoMotion@yahoogroups.com > > > Sent: Thursday, March 29, 2012 7:46 PM > > > Subject: [DynoMotion] Wierd Problem.... > > > > > > > > >  > > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation. > > > > > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on. > > > > > > Regards, > > > Ray L. > > > > > >
|
|
Group: DynoMotion |
Message: 4456 |
From: Tom Kerekes |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Hi Ray,
Not sure why the Interpreter wouldn't complete. Maybe waiting on one of your M Code's or something? Every tight loop should check for Abort and immediately return as an error on Abort. Again it would be easy to find if you can get it into a state where it doesn't return, use the debugger to break and see where it is.
Regarding
#1 - an MDI command should be treated exactly like a 1 line G Code program. When the interpreter is launched it syncs to the current positions, so maybe that isn't happening for some reason. There is some code in KMotionCNC that checks if we were halted and then jogged. It then prompts the User if he would like to do a "safe" move back to where the halt occurred and so forth, or if not it will sync to where it is. This halt/rewind/safe recovery stuff is very complex. I highly recommend you implement it in the same way as KMotionCNC.
#2 I would have to research that but they are all there in the Interpreter state and Vars.
Regards
TK
Group: DynoMotion |
Message: 4457 |
From: himykabibble |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Tom,
#1 - Right. An MDI command is passed as a String, written to a file, passed to the interpreter, using the same method that launches a G-code program. I have a flag that is set true when the interpreter is launched, and cleared, unconditionally, in the Done callback. Like I said, I've found a way to make it misbehave on demand, so I should be able to sort through it more easily now.
I would like Stop to be an unconditional Stop, with no side-effects. So whatever I do next, should start "clean", as though I'd just started up. Sounds like what I need to do is force the interpreters concept of where the machine "should" be, to be where it is. I assume this is what KMotionCNC does when that dialog appears, and the user says "don't move". Does the KMotionCNC code make it clear how to do that?
#2 - Based on Brad's comment, sounds like my only option is to do it through the G-code parameters (5200-????). Are those directly accessible to the PC app? Or do I need to use a combination of PC code and G-code to do it?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Not sure why the Interpreter wouldn't complete. Maybe waiting on one of your M Code's or something? Every tight loop should check for Abort and immediately return as an error on Abort. Again it would be easy to find if you can get it into a state where it doesn't return, use the debugger to break and see where it is.
> Â
> Regarding
> Â
> #1 - an MDI command should be treated exactly like a 1 line G Code program. When the interpreter is launched it syncs to the current positions, so maybe that isn't happening for some reason. There is some code in KMotionCNC that checks if we were halted and then jogged. It then prompts the User if he would like to do a "safe" move back to where the halt occurred and so forth, or if not it will sync to where it is. This halt/rewind/safe recovery stuff is very complex. I highly recommend you implement it in the same way as KMotionCNC.
> Â
> #2 I would have to research that but they are all there in the Interpreter state and Vars.
> Â
> Regards
> TK
> Â
> Â
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, March 31, 2012 9:26 AM
> Subject: [DynoMotion] Re: Wierd Problem....
>
>
> Â
> Tom,
>
> Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on.
>
> Any suggestions on my other issues:
>
> 1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter?
>
> 2) How to read ALL fixture offsets, so I can store them to XML?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÃÂ
> > You have to wait for it to make theÃÂ complete callback.
> > ÃÂ
> > TK
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, March 31, 2012 8:45 AM
> > Subject: [DynoMotion] Re: Wierd Problem....
> >
> >
> > ÃÂ
> > Tom,
> >
> > I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold
> > > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
> > >
> > > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray ,
> > > > ÃâÃÂ
> > > > I can't really think what that might be.ÃâàIt seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> > > > ÃâÃÂ
> > > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> > > > ÃâÃÂ
> > > > If you post all your source code and configuration files IÃâàcould try to find it for you.
> > > > ÃâÃÂ
> > > > Regards
> > > > TKÃâÃÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thursday, March 29, 2012 7:46 PM
> > > > Subject: [DynoMotion] Wierd Problem....
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
> > > >
> > > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 4458 |
From: Tom Kerekes |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Hi Ray,
#1 - I'm a bit confused on the "Stop" terminology. The low level libraries have a concept of Halt and Abort. Halt come to an immediate but controlled stop in a recoverable manner where Abort is more severe and exits at all costs. The CoordMotion Class remembers how and what state it was in when halted. Basically to clear all of this context we need to set:
CoordMotion->m_PreviouslyStopped = STOPPED_NONE;
This is performed from .NET in a call to:
KM_dotnet_Interop_GCodeInterpreter_InitializeInterpreter( int *handle)
#2 - I'm attempting to expand the GetOrigin/SetOrigin stuff to 6 axes.
Regards
TK
Group: DynoMotion |
Message: 4459 |
From: brad murry |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Hey Tom, I already have a fix, can upload later unless you have it under control.
-Brad Murry
From:
Tom Kerekes
Sent:
3/31/2012 4:00 PM
To:
DynoMotion@yahoogroups.com
Subject:
Re: [DynoMotion] Re: Wierd Problem....
Hi Ray,
#1 - I'm a bit confused on the "Stop" terminology. The low level libraries have a concept of Halt and Abort. Halt come to an immediate but controlled stop in a recoverable manner where Abort is more severe and exits at all costs. The CoordMotion
Class remembers how and what state it was in when halted. Basically to clear all of this context we need to set:
CoordMotion->m_PreviouslyStopped = STOPPED_NONE;
This is performed from .NET in a call to:
KM_dotnet_Interop_GCodeInterpreter_InitializeInterpreter(
int *handle)
#2 - I'm attempting to expand the GetOrigin/SetOrigin stuff to 6 axes.
Regards
TK
From: himykabibble <jagboy@...>
To: DynoMotion@yahoogroups.com
Sent: Saturday, March 31, 2012 10:50 AM
Subject: [DynoMotion] Re: Wierd Problem....
Tom,
#1 - Right. An MDI command is passed as a String, written to a file, passed to the interpreter, using the same method that launches a G-code program. I have a flag that is set true when the interpreter is launched, and cleared, unconditionally, in the Done
callback. Like I said, I've found a way to make it misbehave on demand, so I should be able to sort through it more easily now.
I would like Stop to be an unconditional Stop, with no side-effects. So whatever I do next, should start "clean", as though I'd just started up. Sounds like what I need to do is force the interpreters concept of where the machine "should" be, to be where it
is. I assume this is what KMotionCNC does when that dialog appears, and the user says "don't move". Does the KMotionCNC code make it clear how to do that?
#2 - Based on Brad's comment, sounds like my only option is to do it through the G-code parameters (5200-????). Are those directly accessible to the PC app? Or do I need to use a combination of PC code and G-code to do it?
Regards,
Ray L.
--- In
DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Not sure why the Interpreter wouldn't complete. Maybe waiting on one of your M Code's or something? Every tight loop should check for Abort and immediately return as an error on Abort. Again it would be easy to find if you can get it into a state where
it doesn't return, use the debugger to break and see where it is.
> Â
> Regarding
> Â
> #1 - an MDI command should be treated exactly like a 1 line G Code program. When the interpreter is launched it syncs to the current positions, so maybe that isn't happening for some reason. There is some code in KMotionCNC that checks if we were halted
and then jogged. It then prompts the User if he would like to do a "safe" move back to where the halt occurred and so forth, or if not it will sync to where it is. This halt/rewind/safe recovery stuff is very complex. I highly recommend you implement
it in the same way as KMotionCNC.
> Â
> #2 I would have to research that but they are all there in the Interpreter state and Vars.
> Â
> Regards
> TK
> Â
> Â
>
> From: himykabibble <jagboy@...>
> To:
DynoMotion@yahoogroups.com
> Sent: Saturday, March 31, 2012 9:26 AM
> Subject: [DynoMotion] Re: Wierd Problem....
>
>
> Â
> Tom,
>
> Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on.
>
> Any suggestions on my other issues:
>
> 1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter?
>
> 2) How to read ALL fixture offsets, so I can store them to XML?
>
> Regards,
> Ray L.
>
> --- In
DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÂÂ
> > You have to wait for it to make the complete callback.
> > ÂÂ
> > TK
> >
> > From: himykabibble <jagboy@>
> > To:
DynoMotion@yahoogroups.com
> > Sent: Saturday, March 31, 2012 8:45 AM
> > Subject: [DynoMotion] Re: Wierd Problem....
> >
> >
> > ÂÂ
> > Tom,
> >
> > I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and
block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running?
> >
> > Regards,
> > Ray L.
> >
> > --- In
DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold
and/or Stop. FeedHold
> > > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
> > >
> > > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In
DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray ,
> > > > ÂÂÂ
> > > > I can't really think what that might be. It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> > > > ÂÂÂ
> > > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> > > > ÂÂÂ
> > > > If you post all your source code and configuration files I could try to find it for you.
> > > > ÂÂÂ
> > > > Regards
> > > > TKÂÂÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To:
DynoMotion@yahoogroups.com
> > > > Sent: Thursday, March 29, 2012 7:46 PM
> > > > Subject: [DynoMotion] Wierd Problem....
> > > >
> > > >
> > > > ÂÂÂ
> > > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one
MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating
and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
> > > >
> > > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 4460 |
From: Tom Kerekes |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Hi Brad,
ok yes please upload.
Regards
TK
Group: DynoMotion |
Message: 4461 |
From: brad murry |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Yea, will do. I would have done this morning but my primary hdd on my laptop went out to lunch....
Should have her back online soon.
-Brad Murry
From:
Tom Kerekes
Sent:
3/31/2012 5:17 PM
To:
DynoMotion@yahoogroups.com
Subject:
Re: [DynoMotion] Re: Wierd Problem....
Hi Brad,
ok yes please upload.
Regards
TK
From: brad murry <bradodarb@...>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Saturday, March 31, 2012 4:14 PM
Subject: RE: [DynoMotion] Re: Wierd Problem....
Hey Tom, I already have a fix, can upload later unless you have it under control.
-Brad Murry
From:
Tom Kerekes
Sent:
3/31/2012 4:00 PM
To:
DynoMotion@yahoogroups.com
Subject:
Re: [DynoMotion] Re: Wierd Problem....
Hi Ray,
#1 - I'm a bit confused on the "Stop" terminology. The low level libraries have a concept of Halt and Abort. Halt come to an immediate but controlled stop in a recoverable manner where Abort is more severe and exits at all costs. The CoordMotion
Class remembers how and what state it was in when halted. Basically to clear all of this context we need to set:
CoordMotion->m_PreviouslyStopped = STOPPED_NONE;
This is performed from .NET in a call to:
KM_dotnet_Interop_GCodeInterpreter_InitializeInterpreter(
int *handle)
#2 - I'm attempting to expand the GetOrigin/SetOrigin stuff to 6 axes.
Regards
TK
From: himykabibble <jagboy@...>
To: DynoMotion@yahoogroups.com
Sent: Saturday, March 31, 2012 10:50 AM
Subject: [DynoMotion] Re: Wierd Problem....
Tom,
#1 - Right. An MDI command is passed as a String, written to a file, passed to the interpreter, using the same method that launches a G-code program. I have a flag that is set true when the interpreter is launched, and cleared, unconditionally, in the Done
callback. Like I said, I've found a way to make it misbehave on demand, so I should be able to sort through it more easily now.
I would like Stop to be an unconditional Stop, with no side-effects. So whatever I do next, should start "clean", as though I'd just started up. Sounds like what I need to do is force the interpreters concept of where the machine "should" be, to be where it
is. I assume this is what KMotionCNC does when that dialog appears, and the user says "don't move". Does the KMotionCNC code make it clear how to do that?
#2 - Based on Brad's comment, sounds like my only option is to do it through the G-code parameters (5200-????). Are those directly accessible to the PC app? Or do I need to use a combination of PC code and G-code to do it?
Regards,
Ray L.
--- In
DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Not sure why the Interpreter wouldn't complete. Maybe waiting on one of your M Code's or something? Every tight loop should check for Abort and immediately return as an error on Abort. Again it would be easy to find if you can get it into a state where
it doesn't return, use the debugger to break and see where it is.
> Â
> Regarding
> Â
> #1 - an MDI command should be treated exactly like a 1 line G Code program. When the interpreter is launched it syncs to the current positions, so maybe that isn't happening for some reason. There is some code in KMotionCNC that checks if we were halted
and then jogged. It then prompts the User if he would like to do a "safe" move back to where the halt occurred and so forth, or if not it will sync to where it is. This halt/rewind/safe recovery stuff is very complex. I highly recommend you implement
it in the same way as KMotionCNC.
> Â
> #2 I would have to research that but they are all there in the Interpreter state and Vars.
> Â
> Regards
> TK
> Â
> Â
>
> From: himykabibble <jagboy@...>
> To:
DynoMotion@yahoogroups.com
> Sent: Saturday, March 31, 2012 9:26 AM
> Subject: [DynoMotion] Re: Wierd Problem....
>
>
> Â
> Tom,
>
> Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on.
>
> Any suggestions on my other issues:
>
> 1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter?
>
> 2) How to read ALL fixture offsets, so I can store them to XML?
>
> Regards,
> Ray L.
>
> --- In
DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÂÂ
> > You have to wait for it to make the complete callback.
> > ÂÂ
> > TK
> >
> > From: himykabibble <jagboy@>
> > To:
DynoMotion@yahoogroups.com
> > Sent: Saturday, March 31, 2012 8:45 AM
> > Subject: [DynoMotion] Re: Wierd Problem....
> >
> >
> > ÂÂ
> > Tom,
> >
> > I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and
block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running?
> >
> > Regards,
> > Ray L.
> >
> > --- In
DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold
and/or Stop. FeedHold
> > > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
> > >
> > > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In
DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray ,
> > > > ÂÂÂ
> > > > I can't really think what that might be. It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> > > > ÂÂÂ
> > > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> > > > ÂÂÂ
> > > > If you post all your source code and configuration files I could try to find it for you.
> > > > ÂÂÂ
> > > > Regards
> > > > TKÂÂÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To:
DynoMotion@yahoogroups.com
> > > > Sent: Thursday, March 29, 2012 7:46 PM
> > > > Subject: [DynoMotion] Wierd Problem....
> > > >
> > > >
> > > > ÂÂÂ
> > > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one
MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating
and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
> > > >
> > > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 4462 |
From: himykabibble |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Tom,
Stop == Halt. Here's what I'm trying to get: FeedHold seems to work fine. I'd like what I call Stop to stop all movement as quickly as possible, but gracefully, in a controlled manner, also turning off the spindle, coolant, etc. Think of this as something halfway between FeedHold and an E-Stop. What I typically do now is FeedHold, then hit my Stop button. The Stop button does an Interpreter.Halt(), then turns off the spindle and coolant. But this seems to sometimes leave the Interpreter in a funny state. Perhaps I should be doing an Abort here instead?
Thanks for doing the offsets thing. That will be a big help.
Now I have to go tear my machine apart - something's gone wonky with the Y axis. When doing curved contours, they come out faceted when the Y axis is moving minus....
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> #1 - I'm a bit confused on the "Stop" terminology. The low level libraries have a concept of Halt and Abort. Halt come to an immediate but controlled stop in a recoverable manner where Abort is more severe and exits at all costs. The CoordMotion Class remembers how and what state it was in when halted. Basically to clear all of this context we need to set:Â
> Â CoordMotion->m_PreviouslyStopped = STOPPED_NONE;
> Â
> This is performed from .NET in a call to:
> Â KM_dotnet_Interop_GCodeInterpreter_InitializeInterpreter(
> Â int*handle)
> Â
> #2 - I'm attempting to expand the GetOrigin/SetOrigin stuff to 6 axes.
> Â
> Regards
> TK
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, March 31, 2012 10:50 AM
> Subject: [DynoMotion] Re: Wierd Problem....
>
>
> Â
> Tom,
>
> #1 - Right. An MDI command is passed as a String, written to a file, passed to the interpreter, using the same method that launches a G-code program. I have a flag that is set true when the interpreter is launched, and cleared, unconditionally, in the Done callback. Like I said, I've found a way to make it misbehave on demand, so I should be able to sort through it more easily now.
>
> I would like Stop to be an unconditional Stop, with no side-effects. So whatever I do next, should start "clean", as though I'd just started up. Sounds like what I need to do is force the interpreters concept of where the machine "should" be, to be where it is. I assume this is what KMotionCNC does when that dialog appears, and the user says "don't move". Does the KMotionCNC code make it clear how to do that?
>
> #2 - Based on Brad's comment, sounds like my only option is to do it through the G-code parameters (5200-????). Are those directly accessible to the PC app? Or do I need to use a combination of PC code and G-code to do it?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÃÂ
> > Not sure why the Interpreter wouldn't complete.ÃÂ Maybe waiting on one of your M Code's or something?ÃÂ Every tight loop should check for Abort and immediately return as an error on Abort.ÃÂ Again it would be easy to find if you can getÃÂ it into a state where it doesn't return, use the debugger to break and see where it is.
> > ÃÂ
> > Regarding
> > ÃÂ
> > #1 - an MDI command should be treated exactly like a 1 line G Code program.ÃÂ When the interpreter is launched it syncs to the current positions, so maybe that isn't happening for some reason.ÃÂ There is some code in KMotionCNC that checks if we were halted and then jogged.ÃÂ It then prompts the User if he would like to do a "safe" move back to where the halt occurred and so forth, or if not it will sync to where it is.ÃÂ This halt/rewind/safe recovery stuff is very complex.ÃÂ I highly recommend you implement it in the same way as KMotionCNC.
> > ÃÂ
> > #2 I would have to research that but they are all there in the Interpreter state and Vars.
> > ÃÂ
> > Regards
> > TK
> > ÃÂ
> > ÃÂ
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, March 31, 2012 9:26 AM
> > Subject: [DynoMotion] Re: Wierd Problem....
> >
> >
> > ÃÂ
> > Tom,
> >
> > Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on.
> >
> > Any suggestions on my other issues:
> >
> > 1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter?
> >
> > 2) How to read ALL fixture offsets, so I can store them to XML?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃâÃÂ
> > > You have to wait for it to make theÃâàcomplete callback.
> > > ÃâÃÂ
> > > TK
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Saturday, March 31, 2012 8:45 AM
> > > Subject: [DynoMotion] Re: Wierd Problem....
> > >
> > >
> > > ÃâÃÂ
> > > Tom,
> > >
> > > I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold
> > > > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
> > > >
> > > > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray ,
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > I can't really think what that might be.ÃÆ'ââ¬Å¡ÃâàIt seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > If you post all your source code and configuration files IÃÆ'ââ¬Å¡Ãâàcould try to find it for you.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Regards
> > > > > TKÃÆ'ââ¬Å¡ÃâÃÂ
> > > > >
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thursday, March 29, 2012 7:46 PM
> > > > > Subject: [DynoMotion] Wierd Problem....
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
> > > > >
> > > > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 4463 |
From: bradodarb |
Date: 3/31/2012 |
Subject: Re: Wierd Problem.... |
Dyno .net sources and the updated methods for GcodeInterpreter can be downloaded here::
http://sourceforge.net/projects/cnctw/files/DynoMotion%20c%23/KMotion_dotNet_Interop.zip/download
The GcodeInterpreter stuff should be diffed in as I do not believe it was from the latest.
-Brad
--- In DynoMotion@yahoogroups.com, brad murry <bradodarb@...> wrote:
>
> Yea, will do. I would have done this morning but my primary hdd on my laptop went out to lunch....
>
>
> Should have her back online soon.
>
> -Brad Murry
> ________________________________
> From: Tom Kerekes
> Sent: 3/31/2012 5:17 PM
> To: DynoMotion@yahoogroups.com
> Subject: Re: [DynoMotion] Re: Wierd Problem....
>
> Hi Brad,
>
> ok yes please upload.
>
> Regards
> TK
>
> From: brad murry <bradodarb@...>
> To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
> Sent: Saturday, March 31, 2012 4:14 PM
> Subject: RE: [DynoMotion] Re: Wierd Problem....
>
>
>
> Hey Tom, I already have a fix, can upload later unless you have it under control.
>
> -Brad Murry
> From: Tom Kerekes
> Sent: 3/31/2012 4:00 PM
> To: DynoMotion@yahoogroups.com
> Subject: Re: [DynoMotion] Re: Wierd Problem....
>
>
>
> Hi Ray,
>
> #1 - I'm a bit confused on the "Stop" terminology. The low level libraries have a concept of Halt and Abort. Halt come to an immediate but controlled stop in a recoverable manner where Abort is more severe and exits at all costs. The CoordMotion Class remembers how and what state it was in when halted. Basically to clear all of this context we need to set:
> CoordMotion->m_PreviouslyStopped = STOPPED_NONE;
>
> This is performed from .NET in a call to:
> KM_dotnet_Interop_GCodeInterpreter_InitializeInterpreter(int*handle)
>
>
> #2 - I'm attempting to expand the GetOrigin/SetOrigin stuff to 6 axes.
>
> Regards
> TK
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, March 31, 2012 10:50 AM
> Subject: [DynoMotion] Re: Wierd Problem....
>
>
>
> Tom,
>
> #1 - Right. An MDI command is passed as a String, written to a file, passed to the interpreter, using the same method that launches a G-code program. I have a flag that is set true when the interpreter is launched, and cleared, unconditionally, in the Done callback. Like I said, I've found a way to make it misbehave on demand, so I should be able to sort through it more easily now.
>
> I would like Stop to be an unconditional Stop, with no side-effects. So whatever I do next, should start "clean", as though I'd just started up. Sounds like what I need to do is force the interpreters concept of where the machine "should" be, to be where it is. I assume this is what KMotionCNC does when that dialog appears, and the user says "don't move". Does the KMotionCNC code make it clear how to do that?
>
> #2 - Based on Brad's comment, sounds like my only option is to do it through the G-code parameters (5200-????). Are those directly accessible to the PC app? Or do I need to use a combination of PC code and G-code to do it?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Ã
> > Not sure why the Interpreter wouldn't complete.à Maybe waiting on one of your M Code's or something?à Every tight loop should check for Abort and immediately return as an error on Abort.à Again it would be easy to find if you can getà it into a state where it doesn't return, use the debugger to break and see where it is.
> > Ã
> > Regarding
> > Ã
> > #1 - an MDI command should be treated exactly like a 1 line G Code program.Ã When the interpreter is launched it syncs to the current positions, so maybe that isn't happening for some reason.Ã There is some code in KMotionCNC that checks if we were halted and then jogged.Ã It then prompts the User if he would like to do a "safe" move back to where the halt occurred and so forth, or if not it will sync to where it is.Ã This halt/rewind/safe recovery stuff is very complex.Ã I highly recommend you implement it in the same way as KMotionCNC.
> > Ã
> > #2 I would have to research that but they are all there in the Interpreter state and Vars.
> > Ã
> > Regards
> > TK
> > Ã
> > Ã
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, March 31, 2012 9:26 AM
> > Subject: [DynoMotion] Re: Wierd Problem....
> >
> >
> > Ã
> > Tom,
> >
> > Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on.
> >
> > Any suggestions on my other issues:
> >
> > 1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter?
> >
> > 2) How to read ALL fixture offsets, so I can store them to XML?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃâÃ
> > > You have to wait for it to make theÃâà complete callback.
> > > ÃâÃ
> > > TK
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Saturday, March 31, 2012 8:45 AM
> > > Subject: [DynoMotion] Re: Wierd Problem....
> > >
> > >
> > > ÃâÃ
> > > Tom,
> > >
> > > I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold
> > > > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
> > > >
> > > > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray ,
> > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > I can't really think what that might be.ÃÆ'ââ¬Å¡Ãâà It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > If you post all your source code and configuration files IÃÆ'ââ¬Å¡Ãâà could try to find it for you.
> > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > Regards
> > > > > TKÃÆ'ââ¬Å¡ÃâÃ
> > > > >
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thursday, March 29, 2012 7:46 PM
> > > > > Subject: [DynoMotion] Wierd Problem....
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
> > > > >
> > > > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 4464 |
From: himykabibble |
Date: 4/1/2012 |
Subject: Re: Wierd Problem.... |
Brad,
Can I just merge this in with what I have, or should I wait until Tom releases something?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
>
> Dyno .net sources and the updated methods for GcodeInterpreter can be downloaded here::
>
> http://sourceforge.net/projects/cnctw/files/DynoMotion%20c%23/KMotion_dotNet_Interop.zip/download
>
> The GcodeInterpreter stuff should be diffed in as I do not believe it was from the latest.
>
> -Brad
>
>
> --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> >
> > Yea, will do. I would have done this morning but my primary hdd on my laptop went out to lunch....
> >
> >
> > Should have her back online soon.
> >
> > -Brad Murry
> > ________________________________
> > From: Tom Kerekes
> > Sent: 3/31/2012 5:17 PM
> > To: DynoMotion@yahoogroups.com
> > Subject: Re: [DynoMotion] Re: Wierd Problem....
> >
> > Hi Brad,
> >
> > ok yes please upload.
> >
> > Regards
> > TK
> >
> > From: brad murry <bradodarb@>
> > To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
> > Sent: Saturday, March 31, 2012 4:14 PM
> > Subject: RE: [DynoMotion] Re: Wierd Problem....
> >
> >
> >
> > Hey Tom, I already have a fix, can upload later unless you have it under control.
> >
> > -Brad Murry
> > From: Tom Kerekes
> > Sent: 3/31/2012 4:00 PM
> > To: DynoMotion@yahoogroups.com
> > Subject: Re: [DynoMotion] Re: Wierd Problem....
> >
> >
> >
> > Hi Ray,
> >
> > #1 - I'm a bit confused on the "Stop" terminology. The low level libraries have a concept of Halt and Abort. Halt come to an immediate but controlled stop in a recoverable manner where Abort is more severe and exits at all costs. The CoordMotion Class remembers how and what state it was in when halted. Basically to clear all of this context we need to set:
> > CoordMotion->m_PreviouslyStopped = STOPPED_NONE;
> >
> > This is performed from .NET in a call to:
> > KM_dotnet_Interop_GCodeInterpreter_InitializeInterpreter(int*handle)
> >
> >
> > #2 - I'm attempting to expand the GetOrigin/SetOrigin stuff to 6 axes.
> >
> > Regards
> > TK
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, March 31, 2012 10:50 AM
> > Subject: [DynoMotion] Re: Wierd Problem....
> >
> >
> >
> > Tom,
> >
> > #1 - Right. An MDI command is passed as a String, written to a file, passed to the interpreter, using the same method that launches a G-code program. I have a flag that is set true when the interpreter is launched, and cleared, unconditionally, in the Done callback. Like I said, I've found a way to make it misbehave on demand, so I should be able to sort through it more easily now.
> >
> > I would like Stop to be an unconditional Stop, with no side-effects. So whatever I do next, should start "clean", as though I'd just started up. Sounds like what I need to do is force the interpreters concept of where the machine "should" be, to be where it is. I assume this is what KMotionCNC does when that dialog appears, and the user says "don't move". Does the KMotionCNC code make it clear how to do that?
> >
> > #2 - Based on Brad's comment, sounds like my only option is to do it through the G-code parameters (5200-????). Are those directly accessible to the PC app? Or do I need to use a combination of PC code and G-code to do it?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > Ã
> > > Not sure why the Interpreter wouldn't complete.à Maybe waiting on one of your M Code's or something?à Every tight loop should check for Abort and immediately return as an error on Abort.à Again it would be easy to find if you can getà it into a state where it doesn't return, use the debugger to break and see where it is.
> > > Ã
> > > Regarding
> > > Ã
> > > #1 - an MDI command should be treated exactly like a 1 line G Code program.Ã When the interpreter is launched it syncs to the current positions, so maybe that isn't happening for some reason.Ã There is some code in KMotionCNC that checks if we were halted and then jogged.Ã It then prompts the User if he would like to do a "safe" move back to where the halt occurred and so forth, or if not it will sync to where it is.Ã This halt/rewind/safe recovery stuff is very complex.Ã I highly recommend you implement it in the same way as KMotionCNC.
> > > Ã
> > > #2 I would have to research that but they are all there in the Interpreter state and Vars.
> > > Ã
> > > Regards
> > > TK
> > > Ã
> > > Ã
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Saturday, March 31, 2012 9:26 AM
> > > Subject: [DynoMotion] Re: Wierd Problem....
> > >
> > >
> > > Ã
> > > Tom,
> > >
> > > Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on.
> > >
> > > Any suggestions on my other issues:
> > >
> > > 1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter?
> > >
> > > 2) How to read ALL fixture offsets, so I can store them to XML?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÃâÃ
> > > > You have to wait for it to make theÃâà complete callback.
> > > > ÃâÃ
> > > > TK
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Saturday, March 31, 2012 8:45 AM
> > > > Subject: [DynoMotion] Re: Wierd Problem....
> > > >
> > > >
> > > > ÃâÃ
> > > > Tom,
> > > >
> > > > I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold
> > > > > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave.
> > > > >
> > > > > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Ray ,
> > > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > > I can't really think what that might be.ÃÆ'ââ¬Å¡Ãâà It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > > If you post all your source code and configuration files IÃÆ'ââ¬Å¡Ãâà could try to find it for you.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > > Regards
> > > > > > TKÃÆ'ââ¬Å¡ÃâÃ
> > > > > >
> > > > > > From: himykabibble <jagboy@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thursday, March 29, 2012 7:46 PM
> > > > > > Subject: [DynoMotion] Wierd Problem....
> > > > > >
> > > > > >
> > > > > > ÃÆ'ââ¬Å¡ÃâÃ
> > > > > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation.
> > > > > >
> > > > > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 4493 |
From: Brad Murry |
Date: 4/4/2012 |
Subject: Re: Wierd Problem.... |
Hello Ray, I think you only have the GcodeInterpreterDLL in your folder right? If you do not have the sources, you will need to wait. -Brad From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of himykabibble Sent: Sunday, April 01, 2012 8:44 AM To: DynoMotion@yahoogroups.com Subject: [DynoMotion] Re: Wierd Problem.... Brad,
Can I just merge this in with what I have, or should I wait until Tom releases something?
Regards, Ray L.
--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote: > > > Dyno .net sources and the updated methods for GcodeInterpreter can be downloaded here:: > > http://sourceforge.net/projects/cnctw/files/DynoMotion%20c%23/KMotion_dotNet_Interop.zip/download > > The GcodeInterpreter stuff should be diffed in as I do not believe it was from the latest. > > -Brad > > > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote: > > > > Yea, will do. I would have done this morning but my primary hdd on my laptop went out to lunch.... > > > > > > Should have her back online soon. > > > > -Brad Murry > > ________________________________ > > From: Tom Kerekes > > Sent: 3/31/2012 5:17 PM > > To: DynoMotion@yahoogroups.com > > Subject: Re: [DynoMotion] Re: Wierd Problem.... > > > > Hi Brad, > > > > ok yes please upload. > > > > Regards > > TK > > > > From: brad murry <bradodarb@> > > To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com> > > Sent: Saturday, March 31, 2012 4:14 PM > > Subject: RE: [DynoMotion] Re: Wierd Problem.... > > > > > > > > Hey Tom, I already have a fix, can upload later unless you have it under control. > > > > -Brad Murry > > From: Tom Kerekes > > Sent: 3/31/2012 4:00 PM > > To: DynoMotion@yahoogroups.com > > Subject: Re: [DynoMotion] Re: Wierd Problem.... > > > > > > > > Hi Ray, > > > > #1 - I'm a bit confused on the "Stop" terminology. The low level libraries have a concept of Halt and Abort. Halt come to an immediate but controlled stop in a recoverable manner where Abort is more severe and exits at all costs. The CoordMotion Class remembers how and what state it was in when halted. Basically to clear all of this context we need to set: > > CoordMotion->m_PreviouslyStopped = STOPPED_NONE; > > > > This is performed from .NET in a call to: > > KM_dotnet_Interop_GCodeInterpreter_InitializeInterpreter(int*handle) > > > > > > #2 - I'm attempting to expand the GetOrigin/SetOrigin stuff to 6 axes. > > > > Regards > > TK > > > > From: himykabibble <jagboy@> > > To: DynoMotion@yahoogroups.com > > Sent: Saturday, March 31, 2012 10:50 AM > > Subject: [DynoMotion] Re: Wierd Problem.... > > > > > > > > Tom, > > > > #1 - Right. An MDI command is passed as a String, written to a file, passed to the interpreter, using the same method that launches a G-code program. I have a flag that is set true when the interpreter is launched, and cleared, unconditionally, in the Done callback. Like I said, I've found a way to make it misbehave on demand, so I should be able to sort through it more easily now. > > > > I would like Stop to be an unconditional Stop, with no side-effects. So whatever I do next, should start "clean", as though I'd just started up. Sounds like what I need to do is force the interpreters concept of where the machine "should" be, to be where it is. I assume this is what KMotionCNC does when that dialog appears, and the user says "don't move". Does the KMotionCNC code make it clear how to do that? > > > > #2 - Based on Brad's comment, sounds like my only option is to do it through the G-code parameters (5200-????). Are those directly accessible to the PC app? Or do I need to use a combination of PC code and G-code to do it? > > > > Regards, > > Ray L. > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote: > > > > > > Hi Ray, > > >  > > > Not sure why the Interpreter wouldn't complete. Maybe waiting on one of your M Code's or something? Every tight loop should check for Abort and immediately return as an error on Abort. Again it would be easy to find if you can get it into a state where it doesn't return, use the debugger to break and see where it is. > > >  > > > Regarding > > >  > > > #1 - an MDI command should be treated exactly like a 1 line G Code program. When the interpreter is launched it syncs to the current positions, so maybe that isn't happening for some reason. There is some code in KMotionCNC that checks if we were halted and then jogged. It then prompts the User if he would like to do a "safe" move back to where the halt occurred and so forth, or if not it will sync to where it is. This halt/rewind/safe recovery stuff is very complex. I highly recommend you implement it in the same way as KMotionCNC. > > >  > > > #2 I would have to research that but they are all there in the Interpreter state and Vars. > > >  > > > Regards > > > TK > > >  > > >  > > > > > > From: himykabibble <jagboy@> > > > To: DynoMotion@yahoogroups.com > > > Sent: Saturday, March 31, 2012 9:26 AM > > > Subject: [DynoMotion] Re: Wierd Problem.... > > > > > > > > >  > > > Tom, > > > > > > Hmmmm.... The problem I seem to be seeing is it sometimes get into a state where the callback never occurs. I seem to have created a way of making this happen more often, so I'll be digging into it later, to see if I can figure out what's going on. > > > > > > Any suggestions on my other issues: > > > > > > 1) Why an MDI command will move an axis NOT commanded in the MDI command, following a Stop? Shouldn't an Interpreter Abort do something close to a reset on the Interpreter? > > > > > > 2) How to read ALL fixture offsets, so I can store them to XML? > > > > > > Regards, > > > Ray L. > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote: > > > > > > > > Hi Ray, > > > >  > > > > You have to wait for it to make the complete callback. > > > >  > > > > TK > > > > > > > > From: himykabibble <jagboy@> > > > > To: DynoMotion@yahoogroups.com > > > > Sent: Saturday, March 31, 2012 8:45 AM > > > > Subject: [DynoMotion] Re: Wierd Problem.... > > > > > > > > > > > >  > > > > Tom, > > > > > > > > I think I stumbled across a clue to what's happening here. It has to do with how I determine whether the interpreter is running or not. What is the correct way to do this? For example, when I launch and MDI command, I need to know when it completes, and block any subsequent interpreter action until it does. Is there a flag within the interpreter that says it is running? > > > > > > > > Regards, > > > > Ray L. > > > > > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote: > > > > > > > > > > Tom, > > > > > > > > > > I'll post my source later today. Trouble is, I haven't figured out yet exactly what sequence triggers it. It's happened several times, but I can't reproduce it at will. But I do suspect there's something wrong with what I'm doing to implement FeedHold and/or Stop. FeedHold > > > > > generally seems to work correctly, but it's the FeedHold then Stop sequence that seems to sometimes make things misbehave. > > > > > > > > > > I also still have the (scary) problem that if I Stop, jog, then do an MDI command, it will move an axis that was NOT commanded in the MDI. It seems to be trying to move the jogged axis back to where it was when Stop was hit. This has caused several near-crashes. > > > > > > > > > > Regards, > > > > > Ray L. > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote: > > > > > > > > > > > > Hi Ray , > > > > > > ÃÆ'‚ > > > > > > I can't really think what that might be.ÃÆ'‚ It seems like it should be straightforward after it gets into that mode to single step though with the debugger and see what is going wrong on why. > > > > > > ÃÆ'‚ > > > > > > Otherwise you might compare how KMotionCNC handles Stop as compared to how you handle it. > > > > > > ÃÆ'‚ > > > > > > If you post all your source code and configuration files IÃÆ'‚ could try to find it for you. > > > > > > ÃÆ'‚ > > > > > > Regards > > > > > > TKÃÆ'‚ > > > > > > > > > > > > From: himykabibble <jagboy@> > > > > > > To: DynoMotion@yahoogroups.com > > > > > > Sent: Thursday, March 29, 2012 7:46 PM > > > > > > Subject: [DynoMotion] Wierd Problem.... > > > > > > > > > > > > > > > > > > ÃÆ'‚ > > > > > > Occassionally, when I interrupt a running G-code program, by doing FeedHold followed by Stop, something gets in a wierd state, that causes the interpreter to fail to execute the InterpreterDone callback. When it gets in this state, it will execute one MDI command, then hang. If I open a G-code program, and do a SingleStep, the single-stepped command executes correctly, and the Interpreter terminates correctly. I can then execute one MDI command, and, again, the InterpreterDone callback never happens. Terminating and re-starting the PC app will not return sanity - it takes a power-down of the KFlop to restore normal operation. > > > > > > > > > > > > Any ideas what might be going wrong? This is the only remaining bug in my controller app, but I have no clue what's going on. > > > > > > > > > > > > Regards, > > > > > > Ray L. > > > > > > > > > > > > > > > > > > > > >
|
|
| | | | | | | | | |